#ifndef __DEBUG_H
#define __DEBUG_H

#ifdef __cplusplus
 extern "C" {
#endif

#include <stdio.h>
#include "system.h"

#define LOG_EMG_LEVEL       0

#define LOG_COMMON_LEVEL    (LOG_EMG_LEVEL + 1)

#define LOG_ERR_LEVEL       (LOG_COMMON_LEVEL + 1)

#define LOG_WARN_LEVEL      (LOG_ERR_LEVEL + 1)

#define LOG_INFO_LEVEL      (LOG_WARN_LEVEL + 1)

#define LOG_DEBUG_LEVEL     (LOG_INFO_LEVEL + 1)

#if(VERSION_TYPE == DEBUG_VERSION)
	#define PRINT_LEVEL         LOG_DEBUG_LEVEL
#else
	#define PRINT_LEVEL         LOG_ERR_LEVEL
#endif

    #define DEBUG_MSG(fmt, args...)    	App_Printf(LOG_DEBUG_LEVEL,fmt, ##args)
    #define ERROR_MSG(fmt, args...)    	App_Printf(LOG_ERR_LEVEL,fmt,  ##args)
    #define INFO_MSG(fmt, args...)    	App_Printf(LOG_INFO_LEVEL,fmt, ##args)
    #define COMMON_MSG(fmt, args...)    App_Printf(LOG_COMMON_LEVEL,fmt, ##args)

int 	App_Printf(uint8_t level,const char * format, ... );
UINT32  Debug_GetDispFormat(DataBuff_T *_buf);


#ifdef __cplusplus
}
#endif
#endif
